import request from '@/utils/request'

// 查询阶段成果列表
export function listAchievement(query) {
  return request({
    url: '/process/achievement/list',
    method: 'get',
    params: query
  })
}

// 根据阶段ID查询成果列表
export function listAchievementByStageId(stageId) {
  return request({
    url: '/process/achievement/stage/' + stageId,
    method: 'get'
  })
}

// 查询阶段成果详细
export function getAchievement(id) {
  return request({
    url: '/process/achievement/' + id,
    method: 'get'
  })
}

// 新增阶段成果
export function addAchievement(data) {
  return request({
    url: '/process/achievement',
    method: 'post',
    data: data
  })
}

// 修改阶段成果
export function updateAchievement(data) {
  return request({
    url: '/process/achievement',
    method: 'put',
    data: data
  })
}

// 删除阶段成果
export function delAchievement(id) {
  return request({
    url: '/process/achievement/' + id,
    method: 'delete'
  })
}
